package com.qf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @author lenovo
 * @version V1.0
 * @Date 2021/11/18 19:48
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
public class InterfacesApplication {

    //从git上获取雪花算法需要的机器编号
    @Value("${idworker.workerId}")
    private long workerId;

    //从git上获取雪花算法需要的随机数种子
    @Value("${idworker.datacenterId}")
    private long datacenterId;

    public static void main(String[] args) {
        SpringApplication.run(InterfacesApplication.class,args);
    }


//    @Bean
//    public IdWorker idWorker(){
//        return new IdWorker(workerId, datacenterId);
//
//    }
}
